package com.cy.springcloudalibaba.fallbacks;

import com.cy.springcloudalibaba.services.FeignService;
import org.springframework.stereotype.Component;

/**
 * @Description: 调用远程服务的hello接口失败时的回调类
 * @ClassName: HelloFallback
 * @Author: chenyu
 * @Date: 2025/1/7 15:08
 */
@Component
public class FeignFallback implements FeignService {

    @Override
    public String feign(String app) {
        return "feign 发生异常了，暂时采用本地逻辑......";
    }

    @Override
    public String divide(Integer a, Integer b) {
        return "divide 发生异常了，暂时采用本地逻辑......";
    }

    @Override
    public String print(String a) {
        return "feign 发生异常了，暂时采用本地逻辑......";
    }

    @Override
    public String divide(Integer a) {
        return FeignService.super.divide(a);
    }
}
